package unimelb.discussiontracker.twitter.web.model;

public class AjaxRequestResult<T> {
    private T result;

    private boolean success;

    private String errorMessage;

    public AjaxRequestResult(T result) {
        super();
        this.result = result;
        this.success = true;
        this.errorMessage = null;
    }
    
    public AjaxRequestResult(String errorMessage) {
        super();
        this.success = false;
        this.errorMessage = errorMessage;
    }

    public T getResult() {
        return result;
    }

    public boolean isSuccess() {
        return success;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

}
